package com.testmall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
  * @Description: 
  * @Author: littleDesire
  * @Date: 2022-06-21 14:29
  * @Version: 1.0
  * 
  */
@ApiModel(value="com-testmall-entity-Orderitem")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "orderitem")
public class Orderitem implements Serializable {
    /**
     * 订单子表id
     */
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "订单详情表id")
    private String id;

    /**
     * 订单id
     */
    @TableField(value = "orderid")
    @ApiModelProperty(value = "订单详情表对应的订单id")
    private String orderid;

    /**
     * 用户表id
     */
    @TableField(value = "userid")
    @ApiModelProperty(value = "订单详情表用户id")
    private String userid;

    /**
     * 商品id
     */
    @TableField(value = "proid")
    @ApiModelProperty(value = "订单详情表商品id")
    private String proid;

    /**
     * 商品名称
     */
    @TableField(value = "proname")
    @ApiModelProperty(value = "订单详情表商品名称")
    private String proname;

    /**
     * 商品图片地址
     */
    @TableField(value = "proimage")
    @ApiModelProperty(value = "订单详情表商品图片地址")
    private String proimage;

    /**
     * 生成订单时的商品单价，单位是元,保留两位小数
     */
    @TableField(value = "currentunitprice")
    @ApiModelProperty(value = "生成订单详情表时的商品单价，单位是元,保留两位小数")
    private BigDecimal currentunitprice;

    /**
     * 商品数量
     */
    @TableField(value = "quantity")
    @ApiModelProperty(value = "订单详情表商品数量")
    private Integer quantity;

    /**
     * 商品总价,单位是元,保留两位小数
     */
    @TableField(value = "totalprice")
    @ApiModelProperty(value = "订单详情表商品总价,单位是元,保留两位小数")
    private BigDecimal totalprice;

    @TableField(value = "createtime")
    @ApiModelProperty(value = "订单详情表创建时间")
    private Date createtime;

    @TableField(value = "updatetime")
    @ApiModelProperty(value = "订单详情表更新时间")
    private Date updatetime;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_ORDERID = "orderid";

    public static final String COL_USERID = "userid";

    public static final String COL_PROID = "proid";

    public static final String COL_PRONAME = "proname";

    public static final String COL_PROIMAGE = "proimage";

    public static final String COL_CURRENTUNITPRICE = "currentunitprice";

    public static final String COL_QUANTITY = "quantity";

    public static final String COL_TOTALPRICE = "totalprice";

    public static final String COL_CREATETIME = "createtime";

    public static final String COL_UPDATETIME = "updatetime";
}